// 引入mongoose模块
const mongoose = require('mongoose')
// 引入配置文件
const { host, opts } = require('../config/mongodb')

// 连接
mongoose.connect(host, opts)

// 导出mongoose
module.exports = mongoose
